<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 

<style>
</style>

<div width="950px" style="text-align:left;">
<p>客訴案件數管報及列表</p>

	<form id="f1" action="<c:url value="/report08/0801/find.do"/>" method="post">
		起始日期:<input type="text" id="startDate" name="startDate" readonly='true' value="${startDate }">
			~
		結束日期:<input type="text" id="endDate" name="endDate" readonly='true' value="${endDate }">
			<br>
		廠區/執行單位 :
			<select name="searchType">
				<option value="madein" >廠區</option>
				<option value="duty" >執行單位</option>
			</select>
		
			<br>	
		<input type="submit" id="doSearch" value="搜尋"  >		
	</form>

</div>
<script>

$(function() {

	// formate date picker	
	$('#startDate').datepicker({
			dateFormat:"yy-mm-dd",
			changeMonth: true,
			changeYear: true,
			onSelect: function( selectedDate ) {
				$( "#endDate" ).datepicker( "option", "minDate", selectedDate );
			}
		});
	$('#endDate').datepicker({
		dateFormat:"yy-mm-dd",
		changeMonth: true,
		changeYear: true,
		onSelect: function( selectedDate ) {
			$( "#startDate" ).datepicker( "option", "maxDate", selectedDate );
		}
	});

	$("#startDate").keypress(function(event) {event.preventDefault();});
	$("#endDate").keypress(function(event) {event.preventDefault();});

	
});

</script>
